home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Advisor / CD-ROM Advisor.iso / prodemo / demo / dylan.dxr / 00008.ls < prev    next >
Encoding:
Text File  |  1995-09-13  |  1.1 KB  |  38 lines

  1. on mouseDown
  2.   global gChannelForHighButtons, gCenterOfMenuH, gCenterOfMenuV, gMouseDownInButton, gUseMenuButton
  3.   if gUseMenuButton then
  4.     set castNumTemp to 13
  5.   else
  6.     set castNumTemp to 12
  7.   end if
  8.   set tempH to the mouseH
  9.   set tempV to the mouseV
  10.   set gMouseDownInButton to isWithinExitButton(tempH, tempV)
  11.   if gMouseDownInButton then
  12.     set gMouseDownInButton to 1
  13.     set the castNum of sprite gChannelForHighButtons to castNumTemp
  14.     set the locH of sprite gChannelForHighButtons to gCenterOfMenuH
  15.     set the locV of sprite gChannelForHighButtons to gCenterOfMenuV
  16.     set the visible of sprite gChannelForHighButtons to 1
  17.     updateStage()
  18.   end if
  19. end
  20.  
  21. on mouseUp
  22.   global gChannelForHighButtons, gLabelForEndScreen, gMouseDownInButton, gUseMenuButton
  23.   if gMouseDownInButton then
  24.     set tempH to the mouseH
  25.     set tempV to the mouseV
  26.     if isWithinExitButton(tempH, tempV) then
  27.       stopSound()
  28.       if gUseMenuButton then
  29.         play done
  30.       else
  31.         go(gLabelForEndScreen)
  32.       end if
  33.     end if
  34.   end if
  35.   set the visible of sprite gChannelForHighButtons to 0
  36.   set gMouseDownInButton to 0
  37. end
  38.